import http from '../utils/request'

/*
export const getData = () => {
    // 返回一个promise对象
    return http.get('/home/getData')
}

*/


// 请求首页数据
export const getData = () => {
    // 返回一个promise对象
    return http.get('/home/getData')
}

// 获取列表数据
export const getUser = (params) => {
    console.log(params);
    
    // 放回用户列表
    return http.get('/user/getUser', params)
}
// 新增方法
export const addUser = (data) => {
    return http.post('/user/add', data)
}
// 编辑接口
export const editUser = (data) => {
    return http.post('/user/edit', data)
}
// 删除接口
export const delUser = (data) => {
    return http.post('/user/del', data)
}

export const getMenu = (data) => {
    return http.post('/permission/getMenu', data)
}